#include <fcntl.h>
#include <stdio.h>
#include <sys/select.h>
#include <sys/types.h>
#include <unistd.h>

int main(int argc, char *argv[])
{
    fd_set set;
    FD_ZERO(&set);
    FD_SET(STDIN_FILENO, &set);

    if (FD_ISSET(STDIN_FILENO, &set))
    {
        printf("STDIN_FILENO is yes\n");
    }

    if (FD_ISSET(STDOUT_FILENO, &set))
    {
        printf("STDOUT_FILENO is yes\n");
    }

    return 0;
}
